using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using emp.Model;
using emp.BLL;
using emp.IDAL;

namespace emp.ProcessFlow
{
    public class ChannelController
    {
        public bool Insert(emp.Model.Channel channel)
        {
            try
            {
                // Creata a new business logic tier
                emp.BLL.Channel chabll = new emp.BLL.Channel();
                // Call the insert method
                chabll.Insert(channel);

                HttpContext.Current.Response.Redirect("ChannelList.aspx", true);

            }
            catch
            {
                return false;
            }
            return true;
        }
        public bool Update(emp.Model.Channel channel)
        {
            try
            {
                // Creata a new business logic tier
                emp.BLL.Channel chabll = new emp.BLL.Channel();
                // Call the update method
                chabll.Update(channel);

                HttpContext.Current.Response.Redirect("ChannelList.aspx", true);

            }
            catch
            {
                return false;
            }
            return true;
        }
        public bool Delete(int cha_uid)
        {
            try
            {
                // Creata a new business logic tier
                emp.BLL.Channel chabll = new emp.BLL.Channel();
                // Call the delete method
                chabll.Delete(cha_uid);
                HttpContext.Current.Response.Redirect("ChannelList.aspx", true);
            }
            catch
            {
                return false;
            }
            return true;
        }
    }

}